/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package argentracker.model;

import java.util.Date;

import com.google.appengine.api.datastore.Entity;

import argentracker.activeentity.ActiveEntity;
import argentracker.activeentity.P;

/**
 * Hattrick User description.
 * 
 * Must represents the user details fetched from "Team Details" CHPP request. As an example see:
 * 
 * <pre>
 * <code>
 * &lt;User&gt;
 * &lt;UserID&gt;1018002&lt;/UserID&gt;
 * &lt;Language&gt;
 * &lt;LanguageID&gt;51&lt;/LanguageID&gt;
 * &lt;LanguageName&gt;Español, Sudamericano&lt;/LanguageName&gt;
 * &lt;/Language&gt;
 * &lt;HasSupporter&gt;False&lt;/HasSupporter&gt;
 * &lt;Loginname&gt;Matero&lt;/Loginname&gt;
 * &lt;Name&gt;HIDDEN&lt;/Name&gt;
 * &lt;ICQ/&gt;
 * &lt;SignupDate&gt;2004-02-22 19:55:54&lt;/SignupDate&gt;
 * &lt;ActivationDate&gt;2004-03-06 03:09:00&lt;/ActivationDate&gt;
 * &lt;LastLoginDate&gt;2010-02-10 03:36:30&lt;/LastLoginDate&gt;
 * &lt;NationalTeamCoach/&gt;
 * &lt;/User&gt;
 * </code>
 * </pre>
 * 
 * @author matero (matero _at_ gmail _dot_ com)
 */
public class HattrickUser extends ActiveEntity<HattrickUser> {
    
    public static final P<Long, HattrickUser> userID = longProp();
    public static final P<Language, HattrickUser> language = hasOne(Language.class);
    public static final P<Boolean, HattrickUser> hasSupporter = booleanProp();
    public static final P<String, HattrickUser> loginName = stringProp();
    public static final P<String, HattrickUser> name = stringProp();
    public static final P<String, HattrickUser> icq = stringProp();
    public static final P<Date, HattrickUser> signupDate = dateProp();
    public static final P<Date, HattrickUser> activationDate = dateProp();
    public static final P<Date, HattrickUser> lastLoginDate = dateProp();
    public static final P<Boolean, HattrickUser> nationalTeamCoach = booleanProp();    

    public HattrickUser() {
        super();
    }

    public HattrickUser(Entity rawEntity) {
        super(rawEntity);
    }

}
